﻿//<TunynetCopyright>
//--------------------------------------------------------------
//<copyright>青岛拓宇网络科技有限公司 2005-2008</copyright>
//<version>V0.5</verion>
//<createdate>2008-2-23</createdate>
//<author>zhengw</author>
//<email>zhengw@tunynet.com</email>
//<log date="2008-2-23">创建</log>
//--------------------------------------------------------------
//</TunynetCopyright>

using System;
using System.Collections.Generic;
using System.Text;
using ChinaCustoms.Qingdao.Workflow.Permissions;
using Tunynet.QingdaoCustoms.Serialization;

namespace ChinaCustoms.Qingdao.Workflow.Supports
{
    /// <summary>
    /// 子流程实体类
    /// </summary>
    [Serializable]
    public class SubTaskInfo : ExtendedAttributes
    {
        private Guid subTaskGuid;
        /// <summary>
        /// 子流程ID
        /// </summary>
        public Guid SubTaskGuid
        {
            get { return subTaskGuid; }
            set { subTaskGuid = value; }
        }

        private Guid parentSubTaskGuid = Guid.Empty; 
        /// <summary>
        /// ParentSubTaskGuid
        /// </summary>
        public Guid ParentSubTaskGuid
        {
            get { return parentSubTaskGuid; }
            set { parentSubTaskGuid = value; }
        }

        private Guid activityGuid;
        /// <summary>
        /// 工作流相应活动ID
        /// </summary>
        public Guid ActivityGuid
        {
            get { return activityGuid; }
            set { activityGuid = value; }
        }

        private Guid subFlowGuid;
        /// <summary>
        /// 工作流ID
        /// </summary>
        public Guid SubFlowGuid
        {
            get { return subFlowGuid; }
            set { subFlowGuid = value; }
        }

        private Guid taskGuid;
        /// <summary>
        /// 任务ID
        /// </summary>
        public Guid TaskGuid
        {
            get { return taskGuid; }
            set { taskGuid = value; }
        }

        private Guid organizationID;
        /// <summary>
        /// 部门ID
        /// </summary>
        public Guid OrganizationID
        {
            get { return organizationID; }
            set { organizationID = value; }
        }

        private string organizationName = string.Empty;
        /// <summary>
        /// 部门名称
        /// </summary>
        public string OrganizationName
        {
            get { return organizationName; }
            set { organizationName = value; }
        }

        private string sponsorUserName = string.Empty;
        /// <summary>
        /// 子流程发起人
        /// </summary>
        public string SponsorUserName
        {
            get { return sponsorUserName; }
            set { sponsorUserName = value; }
        }

        private string sponsorDisplayName;
        /// <summary>
        /// 子流程发起人姓名
        /// </summary>
        public string SponsorDisplayName
        {
            get { return sponsorDisplayName; }
            set { sponsorDisplayName = value; }
        }

        private string sponsorFullPath;
        /// <summary>
        /// 子流程发起人完整路径
        /// </summary>
        public string SponsorFullPath
        {
            get { return sponsorFullPath; }
            set { sponsorFullPath = PermissionUtils.FormatUserFullPath(value); }
        }

        private string subTaskName;
        /// <summary>
        /// 子流程名称
        /// </summary>
        public string SubTaskName
        {
            get { return subTaskName; }
            set { subTaskName = value; }
        }

        private SubTaskStatus status = SubTaskStatus.Executing;
        /// <summary>
        /// 子流程状态
        /// </summary>
        public SubTaskStatus Status
        {
            get { return status; }
            set { status = value; }
        }

        private DateTime createDate;
        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime CreateDate
        {
            get { return createDate; }
            set { createDate = value; }
        }

        private DateTime acceptDate;
        /// <summary>
        /// 任务的接受日前
        /// </summary>
        public DateTime AcceptDate
        {
            get { return acceptDate; }
            set { acceptDate = value; }
        }
	
        #region 序列化属性

        ///// <summary>
        ///// 最后一个工作项，即办结任务的工作项
        ///// </summary>
        //public Guid LastWorkItemGuid
        //{
        //    get { return GetGuid("LastWorkItemGuid", Guid.Empty); }
        //    set { SetExtendedAttribute("LastWorkItemGuid", value.ToString()); }
        //}

        #endregion
    }
}
